﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SkillifyMaster.master" AutoEventWireup="true" CodeFile="CreateTaskAdmin.aspx.cs" Inherits="CreateTaskAdmin" %>
<%--<%@ Reference Control="~/UserControls/UserSelection.ascx"   %>--%>
<%@ Register src="~/UserControls/UserSelection.ascx" tagname="UserSelection" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style1
        {
            font-size: medium;
            height: 48px;
        }
        .style2
        {
            width: 159px;
        }
        .style3
        
        {
            width: 80px;
        }
        .style4
        {
            width: 89px;
        }
        .style5
        {
            height: 82px;
        }
        .style8
        {
            width: 133px;
        }
    </style>
    <script type="text/javascript" language="javascript">
        function check(value) 
        {


           var ddlVal = document.getElementsByName("Assignment")
           var pnl = document.getElementById("pnlSubject");
            if (ddlVal="2") 
                {
                   
                    document.formTable.disabled = false;

                }
                else
                 {
                    document.formTable.disabled = true;
                  
                 }
         }
           
          function OnClick() 
           {
               if (divStartDtCalendar.style.display == "none")
                {
                    divStartDtCalendar.style.display = "";
                   
                }

                else
                 {
                    divStartDtCalendar.style.display = "none";
                    
                 }


            }
            function OnCalendarClick() {
                if (divEndDtCalendar.style.display == "none") {
                    divEndDtCalendar.style.display = "";

                }

                else 
                {
                    divEndDtCalendar.style.display = "none";

                }


            }
            
//            function change() {
//                alert(divCalendar.childNodes.item.display);
//                //ddlStartDate.text = divCalendar.nodeValue;
//            }

    
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table width=100%>

<tr>
    <td colspan="5" class="style1" align="right">
        <h2>Create Task</h2>
    
    </td>
    </tr>

    <tr>
<td>
<table >
    
    <tr>
    <td>
        Task Name
    </td>
<td colspan="4">
    <asp:TextBox ID="txtTaskName" runat="server" Width="380px" Height="22px" ></asp:TextBox>

       
        
            <asp:RequiredFieldValidator ID="reqTaskName" runat="server" 
                                ControlToValidate="txtTaskName" ErrorMessage="Task Name cannot be null" 
                                ForeColor="Red">*</asp:RequiredFieldValidator>
        </td>
    </tr>



    <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>



    <tr>
    <td>
        Description</td>
<td colspan="4">
    <asp:TextBox ID="txtTaskDesc"  runat="server" TextMode="MultiLine" 
        Width="380px" Height="46px"></asp:TextBox>
     
        </td>

    </tr>

     <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>


    <tr>
    <td>
        Task Type</td>
    <td class="style8">
    <asp:DropDownList ID="ddlTaskType" runat="server" Width="122px" onselectedindexchanged="ddlTaskType_SelectedIndexChanged"  AutoPostBack="true" >
       <%--Onchange="javascript: check(this)"  >--%>
         
    </asp:DropDownList>
       
       </td>
<td class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Task Owner</td>
<td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:DropDownList ID="ddlTaskOwner" runat="server" Width="142px" 
        onselectedindexchanged="ddlTaskOwner_SelectedIndexChanged">
    </asp:DropDownList>
    &nbsp;&nbsp;
    
        
            
            <asp:CompareValidator ID="cmpTaskOwner" runat="server" 
                ControlToValidate="ddlTaskOwner" ErrorMessage="Please Slect TaskOwner" 
               Operator="NotEqual" ValueToCompare="--Select One--" ForeColor="Red">*</asp:CompareValidator>
       </td>

    </tr>


     <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>



    <tr>
    <td colspan="5">
    </td>
   
    </tr>

    
    <tr>
    <td>
    
    Test Name
    </td>
    <td colspan="4">
        <asp:DropDownList ID="ddlTestName" runat="server" Width="389px" Height="21px">
        </asp:DropDownList>
        
           
            <asp:CompareValidator ID="cmpTestName" runat="server" 
                ControlToValidate="ddlTestName" ErrorMessage="Please Select TestName" 
                Operator="NotEqual" ValueToCompare="--Select One--" ForeColor="Red">*</asp:CompareValidator>
       </td>
    </tr>

     <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>




    <tr>
    <td>Start Date</td>
    <td class="style8">
        &nbsp;
        <asp:TextBox id="txtStartDate" runat="server" Width="91px"></asp:TextBox>
        
         <INPUT type="button" value=":::" onclick="OnClick()">
 
            <div id="divStartDtCalendar" style="DISPLAY: none; POSITION: absolute">
              <asp:Calendar id="CalendarDisplay" runat="server" BorderWidth="2px" OnSelectionChanged="CalendarDisplay_SelectionChanged"
                            BackColor="White" Width="200px"
                ForeColor="Black" Height="180px" Font-Size="8pt"
                                  Font-Names="Verdana" BorderColor="#999999"
                BorderStyle="Outset" DayNameFormat="FirstLetter" CellPadding="4">
                <TodayDayStyle ForeColor="Black" BackColor="#CCCCCC">
                  </TodayDayStyle>
                <SelectorStyle BackColor="#CCCCCC"></SelectorStyle>
                <NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
                <DayHeaderStyle Font-Size="7pt" Font-Bold="True"
                                BackColor="#CCCCCC"></DayHeaderStyle>
                <SelectedDayStyle Font-Bold="True" ForeColor="White"
                                  BackColor="#666666"></SelectedDayStyle>
                <TitleStyle Font-Bold="True" BorderColor="Black"
                            BackColor="#999999"></TitleStyle>
                <WeekendDayStyle BackColor="#FFFFCC"></WeekendDayStyle>
                <OtherMonthDayStyle ForeColor="#808080"></OtherMonthDayStyle>
    
              </asp:Calendar>
            </div>


        &nbsp;
        </td>
    <td class="style4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Date</td>
    <td colspan="2">
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox id="txtEndDate" runat="server" Width="121px"></asp:TextBox>
            <%--  </form>--%>
            <INPUT type="button" value=":::" onclick="OnCalendarClick()">
 
            <div id="divEndDtCalendar" style="DISPLAY: none; POSITION: absolute">
              <asp:Calendar id="cldDisplay" runat="server" BorderWidth="2px" OnSelectionChanged="CalendarEndDt_SelectionChanged"
                            BackColor="White" Width="200px"
                ForeColor="Black" Height="180px" Font-Size="8pt"
                                  Font-Names="Verdana" BorderColor="#999999"
                BorderStyle="Outset" DayNameFormat="FirstLetter" CellPadding="4">
                <TodayDayStyle ForeColor="Black" BackColor="#CCCCCC">
                  </TodayDayStyle>
                <SelectorStyle BackColor="#CCCCCC"></SelectorStyle>
                <NextPrevStyle VerticalAlign="Bottom"></NextPrevStyle>
                <DayHeaderStyle Font-Size="7pt" Font-Bold="True"
                                BackColor="#CCCCCC"></DayHeaderStyle>
                <SelectedDayStyle Font-Bold="True" ForeColor="White"
                                  BackColor="#666666"></SelectedDayStyle>
                <TitleStyle Font-Bold="True" BorderColor="Black"
                            BackColor="#999999"></TitleStyle>
                <WeekendDayStyle BackColor="#FFFFCC"></WeekendDayStyle>
                <OtherMonthDayStyle ForeColor="#808080"></OtherMonthDayStyle>
    
              </asp:Calendar>
            </div>
  
           <%-- <asp:CompareValidator ID="cmpDate" runat="server" 
                ControlToCompare="txtStartDate" ControlToValidate="txtEndDate" 
                ErrorMessage="End Date should not be less than start date" 
                Operator="GreaterThan" Type="Date">*</asp:CompareValidator>--%>
  
        </td>

    </tr>


     <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>

    <tr>
    <td colspan="5">
        <uc1:UserSelection ID="UserSelection1" runat="server" />
    </td></tr>
   

 <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>


    <tr>
    <td>
    
    Status
    </td>
    <td colspan="4">
        <asp:DropDownList ID="ddlStatus" runat="server" Height="20px" Width="392px">

        <asp:ListItem Value="0">--Select One--</asp:ListItem>
            <asp:ListItem Value="1">Scheduled</asp:ListItem>
            <asp:ListItem Value="2">InProgress </asp:ListItem>
            <asp:ListItem Value="3">Complete </asp:ListItem>
            <asp:ListItem Value="4">Pending </asp:ListItem>
        </asp:DropDownList>
        
        <asp:CompareValidator ID="cmpStatus" runat="server" 
            ControlToValidate="ddlStatus" ErrorMessage="Please Select Status" 
            ForeColor="Red" Operator="NotEqual" ValueToCompare="--Select One--">*</asp:CompareValidator>
        
    </td>
    </tr>



   <tr>
    <td colspan="4">
    <br />
    </td>
    </tr>



    <tr>
    <td>
        Remarks</td>
<td colspan="4">
   
     
        <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine"  Width="384px" 
            Height="40px"></asp:TextBox>
   
     
        </td>

    </tr>


    <tr>
    <td colspan="4" align="center">
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
            onclick="btnSubmit_Click" BackColor="#E49642" BorderColor="#CC7A24" 
            ForeColor="White" Width="72px" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnClear" runat="server" Text="Clear" 
             BackColor="#E49642" BorderColor="#CC7A24" 
            ForeColor="White" Width="72px" onclick="btnClear_Click" />
    </td>
    </tr>
    <tr>
    <td>
        
    </td>
    <td colspan="4">
      <asp:ValidationSummary ID="validationMessage" runat="server" ForeColor="Red" />
      <asp:Label ID="lblErrorMessage" runat="server" Text=""></asp:Label>
    </td>
    
    </tr>
    </table>

</td>

<td>
<asp:Panel ID="pnlSubject" runat="server">
       
<%--<form id="formTable" action="" name="formTable"  >--%>
    <table style="border: 4px outset orange;">
     <tr>
    <td colspan="3">
    <br />
    </td>
    </tr> <tr>
    <td colspan="3">
        
    <br />
    </td>
    </tr> 
   


     <tr >
     <td colspan="3" >Subject&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     
          <asp:DropDownList ID="ddlSub" runat="server" Width="122px" 
             AutoPostBack="True" 
             onselectedindexchanged="ddlSub_SelectedIndexChanged" >
         </asp:DropDownList>
         
         </td>
    
     </tr>

      <tr>
    <td colspan="3">
    <br />
    </td>
    </tr>



     <tr>
     <td>Topics Available
       
     </td>
     <td></td>
     <td>Topics Selected
     
     </td>
     </tr>
     <tr>
     <td rowspan="2">

         <asp:ListBox ID="lstTopics" runat="server" Width="190px" 
             Height="200px"></asp:ListBox>

     </td>
       <td valign="bottom" class="style5">

           <asp:Button ID="btnAdd" runat="server" Text=">>" BackColor="#E49642" 
               BorderColor="#CC7A24" ForeColor="White" onclick="btnAdd_Click" />

     </td>
       <td rowspan="2">

           <asp:ListBox ID="lstTopicSelect" runat="server" Width="190px" Height="200px"></asp:ListBox>
         
     </td>
     </tr>

      <tr>
    <td colspan="4" valign="top">
        <br />
           <asp:Button ID="btnRemove" runat="server" Text="<<" BackColor="#E49642" 
               BorderColor="#CC7A24" ForeColor="White" onclick="btnRemove_Click" />

    <br />
    </td>
    </tr>


     <tr>
       <td colspan="3">

          <br /></td>
     </tr>

     <tr>
     <td colspan="3">
     Reference library
         <asp:GridView ID="gvLibrary" runat="server">
         </asp:GridView>
    </td>
     </tr>

      <tr>
    <td colspan="3">
    <br />
    </td>
    </tr>


     <tr>
     <td colspan="3">
         <asp:CheckBox ID="chkVerify" runat="server" />Verification Required</td>
     </tr>

      <tr>
    <td colspan="3">
    <br />
    </td>
    </tr> <tr>
    <td colspan="3">
        <br />
    </td>
    </tr>


     </table>
   <%--  </form>--%>
</asp:Panel>
</td>
</tr>
</table>
    
</asp:Content>

